tf = open("f.txt", "a+", encoding='utf-8')
tf.write("\n我是最后一行\n")
tf.seek(0)
txt = tf.read()
print(txt)
tf.close()